﻿PARAM($ModificationType,$DN,[hashTable] $ChangedAttributes,[hashTable] $AddedValues,[hashTable] $RemovedValues)

$msg = "DN = $DN"

$ChangedAttributes = @{"test1"="value1";"test2"="value2"}


foreach($item in $ChangedAttributes.Keys)
{
    $msg+=$item.Key + "=" + $item.Value + "`n"
}

foreach ($attr in $ChangedAttributes)
{
    $msg+="`nChanged = " + $attr
}
Write-Eventlog  -Logname 'Application' -source 'Application' `
-eventID 1000 -EntryType Information -message $msg